package lab02.Test06;

/**
 * Created by Administrator on 2017/10/15.
 */
public class Ladder {
 //属性：上底，下底，高，面积
    double above,bottom,height,area;
   public Ladder(double a,double b,double h )
    {above=a;bottom=b;height=h;}
        //  行为:返回面积
    double area(){return (above+bottom)*height/2;

    }

    public static void main(String[] args) {
        Ladder area1=new Ladder(3,5,6);
        System.out.println("面积是"+area1.area());
    }
  }
